CIRCLES

c1=(x-2)^2 + (y-1)^2==1;

ContourPlot[Evaluate[c1],{x,1,3},{y,0,2}]

gc1=Graphics[Circle[{2,1},1]]

Show[gc1,AspectRatio->1,Axes->True]

Show[Graphics[Circle[{2,1},1],AspectRatio->Automatic,Axes->Automatic]]

Show[Graphics[{Circle[{0,0},1],Circle[{0,0},{2,1}],Circle[{0,0},2,{0,1}]},AspectRatio->1,Axes->True]]

Show[Graphics[{Circle[{0,0},1],Circle[{0,0},{2,1}],Circle[{0,0},2,{0,Pi}]},AspectRatio->Automatic,Axes->True]]

ContourPlot[(((-1+x))^2)+(((-4+y))^2)-4==0,{x,-1,3},{y,2,6}]

HowToInputData[]:=Module[{},Print["Input Circles as x^2 + y^2 + Ax + By + C == 0 OR"];
Print["(x-xo)^2 + (y-y0)^2 == RSquared"]]

(*
mycircle[f_,x_,y_]:=Module[{A,B,C},
If[MatchQ[f, x^2+y^2+A_.*x+ B_.*y +C_. ==0 /; NumericQ[A]&&NumericQ[B]&&NumericQ[C]],
A=Coefficient[f[[1]],x];B=Coefficient[f[[1]],y]; 
C=Select[f[[1]], FreeQ[#,var_Symbol]&];
mycircle1[A,B,C],
Print["Dos not Match the equation x^2 + y^2 + Ax^2 + C == 0 OR"];
Print["Dos not Match the equation (x-xo)^2 + (y-y0)^2 == R^2"]]]
*)

mycircle[f_,x_,y_]:=Module[{A,B,C,T},
If[MatchQ[f, x^2+y^2+A_.*x+ B_.*y +C_. ==0 /; NumericQ[A]&&NumericQ[B]&&NumericQ[C]],
A=Coefficient[f[[1]],x];B=Coefficient[f[[1]],y]; 
C=Select[f[[1]], FreeQ[#,var_Symbol]&];
mycircle1[A,B,C], 
If[MatchQ[f, (x+x0_.)^2+(y+y0_.)^2==SR_ 
                                  /; NumericQ[x0]&&NumericQ[y0]&&NumericQ[SR]],
      T=Expand[f[[1]]-f[[2]]];
      A=Coefficient[T,x];B=Coefficient[T,y]; C=Select[T, FreeQ[#,var_Symbol]&];
      mycircle1[A,B,C],
Print["Dos not Match the equation x^2 + y^2 + Ax + By + C == 0 OR"];
Print["Dos not Match the equation (x-xo)^2 + (y-y0)^2 == R^2"]]]]

mycircle1[a_,b_,c_]:=Module[{d,centre, radius},
d=a^2+b^2-4c;
If[d<0, Print["Not A circle"]]; 
If[d==0, Print["Circle is a point"]];
If[d>0, centre={-a/2, -b/2}; radius=Sqrt[d]/2; 
      Print[{"Circle",centre,radius}];
     Show[Graphics[{Circle[centre,radius], {PointSize[0.02],Point[centre]},Text["Center",centre,{0,-1}]},
PlotLabel->"Graph of Circle",
AspectRatio->Automatic,Axes->Automatic]]]]

HowToInputData[]

mycircle[ x^2+ y^2 -2x-8y+13==0,x,y]

mycircle[x^2+y^2+5x+14y==0,x,y]

mycircle[x^2+y^2-6x-4y-12==0,x,y]

mycircle[(x-3)^2+(y+5)^2==9,x,y]

mycircle[x^2+y^2-kx-4y-m==0,x,y]

CirleThrough3Points[{p1_?NumericQ,p2_?NumericQ},{q1_?NumericQ,q2_?NumericQ},{s1_?NumericQ,s2_?NumericQ} ,x_,y_]:=Module[{A,B,C,f,eqns,sol},
f=x^2+y^2+A*x+B*y+C==0;
eqns={f/.{x->p1, y->p2} ,f/.{x->q1, y->q2},f/.{x->s1, y->s2}};
Print[eqns];
sol=Solve[eqns,{A,B,C}][[1]];Print[sol];
If [sol==={},Print["No Circle through the points"],
                              f=f/.sol;Print["circle ",f];mycircle[f,x,y]]]

CirleThrough3Points[{0,6},{-1,-1},{6,6},x,y]

CirleThrough3Points[{1,2},{3,4},{1,6},x,y]